Conversation
Split requirements into requirements.in (direct dependencies with
loose constraints) and requirements.txt (fully pinned lockfile with
hashes, generated by pip-compile). This makes Docker builds
deterministic and prevents unrelated PRs from pulling in breaking
dependency updates.
To update dependencies:
docker run --rm -v "$(pwd)/backend:/app" -w /app python:3.13-slim-bookworm \
sh -c "pip install --quiet pip-tools && pip-compile --strip-extras \
--generate-hashes --output-file requirements.txt requirements.in"
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
The production Dockerfile already uses python:3.13-slim-bookworm. Dev was on python:3.11-slim, which could mask compatibility issues. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Prevents merging PRs where someone edits requirements.in but forgets to regenerate the lockfile with pip-compile. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Pins backend Python dependencies using pip-compile to prevent deploy breakages from drifting/unpinned packages, and adds documentation + CI guardrails to keep the lockfile updated.
Changes:
- Introduce
backend/requirements.inand regeneratebackend/requirements.txtas a fully pinned, hashed lockfile. - Update docs with a repeatable
pip-compileworkflow for updating backend dependency pins. - Replace the dummy CI workflow with a PR check that enforces updating
requirements.txtwhenrequirements.inchanges.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
docker-README.md |
Documents how to regenerate backend dependency pins with pip-tools. |
backend/requirements.txt |
Replaces the old loosely-pinned requirements with a pip-compiled, hashed lockfile. |
backend/requirements.in |
Adds the source-of-truth direct dependency list for pip-compile. |
backend/Dockerfile.dev |
Updates the dev image base to Python 3.13 bookworm to match the lockfile generation context. |
README.md |
Updates prerequisites and documents the backend lockfile update process. |
.github/workflows/ci.yml |
Adds a PR-time check to ensure lockfile changes accompany input dependency changes. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
Move pytest and pytest-asyncio to a separate requirements-dev.in so they don't ship in the production image. Add psycopg2-binary to requirements.in and remove the separate pip install from the prod Dockerfile. Update README Quick Start to use Docker commands instead of make targets. Update CI to check both lockfiles. Regenerate both lockfiles. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Move Makefile targets into a separate "Local Development (not recommended)" section. Standardize on "docker compose" (space) in all documentation. Add Docker command for populating mock data. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Yhg1s
approved these changes
Mar 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Any merged PR triggers deploy events for both frontend and backend, and currently the backend requirements.txt is outdated with insufficient pinning, leading to a failed deploy.
This PR fixes that by employing
pip-compileto pin production deps and allow updating the pins painlessly.There's some semi-related documentation churn here, too, standardizing development on "docker compose". There wasn't a great place to put those changes in separately, so let's just be done with it now.